GtkSnapshot: Always use int for the translation
authorAlexander Larsson <alexl@redhat.com>
Wed, 11 Jan 2017 15:14:03 +0000 (16:14 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 11 Jan 2017 15:14:03 +0000 (16:14 +0100)
commitc00f8dce9f8076e3e914210dda62e7fd2207d1e4
tree016ec44ab7b6eea3a595c8f2cdebe3ddb7d1196a
parent275185d4157f40def0ec34c98058a98c4b98382f
GtkSnapshot: Always use int for the translation

We already take ints when setting the translation, so it can't
currently take any other values. Additionally, I was seeing large
costs in int -> double -> int for the rects in
gtk_snapshot_clips_rect(), as all callers really are ints (widget
allocations) and the clip region is int-based.

This change completely cleared a 2% rectangle_init_from_graphene from
the profile and is likely to have nice performance effects elsewhere
too.
gtk/gtkcssgadget.c
gtk/gtkcssimagelinear.c
gtk/gtkcssshadowvalue.c
gtk/gtkiconview.c
gtk/gtkrenderborder.c
gtk/gtksnapshot.c
gtk/gtksnapshot.h
gtk/gtksnapshotprivate.h
gtk/gtkwidget.c